#include "equipmentshop.h"
#include "ui_equipmentshop.h"
#include<QWidget>
#include<QLabel>
#include<QKeyEvent>
#include<QPixmap>
#include<QPushButton>
#include<qrect.h>
#include<QFont>
#include"menu.h"
#include <QDebug>
Equipmentshop::Equipmentshop()
{
    this->setGeometry(435,100,700,700);
    startRealgameButton=new QPushButton("前往鬼房",this);
    startRealgameButton->move(590,580);
    startRealgameButton->resize(100,50);
    setFixedSize(700,700);
    setWindowTitle("装备车");
    ui_mainwindow=new MainWindow();
    connect(startRealgameButton,&QPushButton::clicked,this,&Equipmentshop::startrealgame);
}
//Equipmentshop::~Equipmentshop()
//{
//    delete ui;
//}
//void Equipmentshop::paintEvent(QPaintEvent*event)
//{

//}
void Equipmentshop::keyPressEvent(QKeyEvent *event)
{
    QKeyEvent *key=(QKeyEvent*)event;
    switch(key->key())
    {
    case Qt::Key_Escape:
        //emit sendsignal();
        this->close();
        menu1->show();
        break;
    }
}
void Equipmentshop::startrealgame()
{
    this->close();
    ui_mainwindow->show();
}
void Equipmentshop::paintEvent(QPaintEvent*event)
{
    QPainter painter(this);
    QFont font1("Micro soft YaHei UZ",15);
    painter.setFont(font1);
    painter.setPen(Qt::black);
    painter.setBrush(Qt::black);
    painter.drawText(220,50,"圣木");
    painter.drawText(220,90,"库存");
    painter.drawText(220,130,"装备");
    painter.drawText(270,50,"10RMB");
    painter.drawText(270,90,"2");
    painter.drawText(270,130,"2");
}




